package JavaCore;

public class MyMath implements MyMathInterface{
	
	

	public static void main(String[] args) {


	}

	@Override
	public int max(int a, int b) {
		int c = (a>b)?a:b;
		return c;
		
	}

	@Override
	public int min(int a, int b) {
		int c = (a<b)?a:b;
		return c;
		
	}

	@Override
	public int hap(int[] a) {
		int sum=0;
		for (int i=0;i<a.length;i++){
			sum += a[i];
		}		
		return sum;		
	}

}
